In a memory, e.g., a Static Random Access Memory (SRAM), Process Voltage Temperature (PVT) variations may lead to leakage current variations. A current generator in the memory needs to meet a specified current range for the memory, but some current generators cannot maintain the current within the specification due to PVT variations, e.g., when the power supply voltage VDD is high and a gain of an op-amp in the current generator is low.